/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package unsch.secretaria.dao;

import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.ResultSet;
import java.util.ArrayList;
import unsch.secretaria.bean.BEscuela;
import unsch.secretaria.bean.BRelacionGrado;
import unsch.secretaria.ds.DSConexion;

/**
 *
 * @author CHRISTIAN
 */
public class DAOResolucionExpediente {

    public synchronized ArrayList<BRelacionGrado> listarGradoBachiller() {
        try {
            Connection cn = null;
            CallableStatement call = null;
            ResultSet rs = null;

            ArrayList<BRelacionGrado> lstBRelacionGrados = new ArrayList<BRelacionGrado>();
            try {
                String sql = "{CALL ps_listarGradoBachiller()}";

                cn = new DSConexion().getConectar();
                call = cn.prepareCall(sql);
                rs = call.executeQuery();
                while (rs.next()) {

                    BRelacionGrado oBRelacionGrado = new BRelacionGrado();
                    oBRelacionGrado.setNombreApellido(rs.getString(1));
                    oBRelacionGrado.setDenominacionDiploma(rs.getString(2));
                    oBRelacionGrado.setFechaSesion(rs.getString(3));

                    lstBRelacionGrados.add(oBRelacionGrado);
                }

                return lstBRelacionGrados;

            } catch (Exception e) {
                System.out.println("Error en listar escuela" + e);
                return null;
            }
        } catch (Exception e) {
            return null;
        }
    }

    public synchronized ArrayList<BRelacionGrado> listarTituloProfesional() {
        try {
            return null;
        } catch (Exception e) {
            return null;
        }
    }

    public synchronized ArrayList<BRelacionGrado> listarGradoMaestro() {
        try {
            return null;
        } catch (Exception e) {
            return null;
        }
    }
}
